package com.red.wine.widget;

import android.content.Context;
import android.content.res.Resources;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.Canvas;
import android.graphics.LinearGradient;
import android.graphics.Matrix;
import android.graphics.Paint;
import android.graphics.PorterDuffXfermode;
import android.graphics.Bitmap.Config;
import android.graphics.PorterDuff.Mode;
import android.graphics.Shader.TileMode;
import android.view.View;
import android.view.ViewGroup;
import android.widget.BaseAdapter;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ImageView.ScaleType;

public class ImageAdapters extends BaseAdapter {

	int mGalleryItemBackground;
	private Context mContext;
	private View[] mImageIds;
	private View[] mImages;
	private int height;
	public ImageAdapters(Context c, View[] ImageIds,int width,int height) {
		mContext = c;
		mImageIds = ImageIds;
		mImages = new View[mImageIds.length];
	}

	public boolean createReflectedImages() {
		int index = 0;
//
		for (View imageId : mImageIds) {
			int width = imageId.getWidth();

			View imageView = new View(mContext);
//			imageView.setLayoutParams(new GalleryFlow.LayoutParams(width-200, height));
			imageView.setLayoutParams(new LinearLayout.LayoutParams(width - 200, height));
			mImages[index++] = imageId;
		}
		return true;
	}

	private Resources getResources() {
		// TODO Auto-generated method stub
		return null;
	}

	public int getCount() {
		return mImageIds.length;
	}

	public Object getItem(int position) {
		return position;
	}

	public long getItemId(int position) {
		return position;
	}

	public View getView(int position, View convertView, ViewGroup parent) {
		return mImages[position];
	}


}
